package com.sunny.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by GWCheng on 2016/3/8.
 */
@Controller
public class AdminController {
    // 登录成功的页面
    @RequestMapping(value = "/admin/home")
    public String adminHomePage(){
        return "/admin/home";
    }

    // 只有角色为admin的才能访问
 //   @RequiresRoles("admin")
    @RequestMapping(value = "/admin/role")
    public String adminWithRole(){
        return "/admin/home";
    }

    // 只用同时具有user:view和user:create权限才能访问
 //   @RequiresPermissions(value={"user:view","user:create"}, logical= Logical.OR)
    @RequestMapping(value = "/admin/auth")
    public String adminWithAuth(){
        return "/admin/withauth";
    }
}